/**
 * jims
 */
package com.jims.master.modules.patient.myRecord.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jims.master.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.util.Date;
import java.util.List;

/**
 * Entity
 * @author chentao
 * @version 2017-06-17
 */
public class CaseReport extends DataEntity<CaseReport> {
	
	private static final long serialVersionUID = 1L;
	private String baseinfo;		// 患者id
	private Date preDate;		// 上传时间
	private String medicalType;		// 病历类型：0:住院病历、1:门诊病历
	private String type;		// 类型：0:病历图片、1:病历地址
	private String sex;      //患者当时性别
	private String age;      //患者当时年龄
    private String caseNo;      //his数据单号
    private String visitDept;   //就诊科室
	private Date visitDate;		// 住院日期
    private String clinicId;      //门诊ID
	private String visitId;       //住院ID
    private String person;       //患者baseinfo
    private String doctor;        //门诊医生
    private String right;        //医生对患者病历的权限
    private String visitDateStr;
	private String orgName;		// 住院机构
	private String orgId;		// 住院ID
    private String fileType;    //子表文件类型
	private String startTime;
	private String endTime;

	public String getVisitId() {
		return visitId;
	}

	public void setVisitId(String visitId) {
		this.visitId = visitId;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getAge() {
		return age;
	}

	public void setAge(String age) {
		this.age = age;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	private List<CaseReportFile> caseReportFileList;

	public List<CaseReportFile> getCaseReportFileList() {
		return caseReportFileList;
	}

	public void setCaseReportFileList(List<CaseReportFile> caseReportFileList) {
		this.caseReportFileList = caseReportFileList;
	}

	public CaseReport() {
		super();
	}

	public CaseReport(String id){
		super(id);
	}

	@Length(min=1, max=64, message="患者id长度必须介于 1 和 64 之间")
	public String getBaseinfo() {
		return baseinfo;
	}

	public void setBaseinfo(String baseinfo) {
		this.baseinfo = baseinfo;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getPreDate() {
		return preDate;
	}

	public void setPreDate(Date preDate) {
		this.preDate = preDate;
	}
	
	@Length(min=1, max=1, message="病历类型：0:住院病历、1:门诊病历长度必须介于 1 和 1 之间")
	public String getMedicalType() {
		return medicalType;
	}

	public void setMedicalType(String medicalType) {
		this.medicalType = medicalType;
	}
	
	@Length(min=1, max=1, message="类型：0:病历图片、1:病历地址长度必须介于 1 和 1 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getVisitDate() {
		return visitDate;
	}

	public void setVisitDate(Date visitDate) {
		this.visitDate = visitDate;
	}
	
	@Length(min=0, max=64, message="住院机构长度必须介于 0 和 64 之间")
	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}
	
	@Override
    @Length(min=0, max=64, message="住院ID长度必须介于 0 和 64 之间")
	public String getOrgId() {
		return orgId;
	}

	@Override
    public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

    public String getVisitDateStr() {
        return visitDateStr;
    }

    public void setVisitDateStr(String visitDateStr) {
        this.visitDateStr = visitDateStr;
    }

    public String getCaseNo() {
        return caseNo;
    }

    public void setCaseNo(String caseNo) {
        this.caseNo = caseNo;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public String getClinicId() {
        return clinicId;
    }

    public void setClinicId(String clinicId) {
        this.clinicId = clinicId;
    }

    public String getVisitDept() {
        return visitDept;
    }

    public void setVisitDept(String visitDept) {
        this.visitDept = visitDept;
    }

    public String getDoctor() {
        return doctor;
    }

    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }

    public String getRight() {
        return right;
    }

    public void setRight(String right) {
        this.right = right;
    }

    public String getPerson() {
        return person;
    }

    public void setPerson(String person) {
        this.person = person;
    }
}